'use strict';
module.exports = (sequelize, DataTypes) => {
  const users = sequelize.define('users', {
    passWord: {
      allowNull: false,
      type: DataTypes.STRING(16)
    },
    number: {
      allowNull: false,
      type: DataTypes.STRING(16)
    },
    age: {
      type: DataTypes.INTEGER(4)
    },
    iphone:{
      type: DataTypes.STRING(16)
    },
    identity:{
      type: DataTypes.STRING(20)
    },
    name: {
      type: DataTypes.STRING(16)
    },
    avater: {
      type: DataTypes.STRING(80)
    },
    email:{
      type: DataTypes.STRING(32)
    },
    isUsed: {
      type: DataTypes.BOOLEAN,
      allowNull: false,
      defaultValue: 0
    },
    money: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: 0
    },
    createdAt: {
      allowNull: false,
      type: DataTypes.DATE
    },
    updatedAt: {
      allowNull: false,
      type: DataTypes.DATE
    }
  }, {
    tableName: 'users',
    charset: 'utf8mb4',
    collate: 'utf8mb4_bin'
  });
  users.associate = function(models) {
    // associations can be defined here
  };
  return users;
};